package Day6Zuoye.Circle;

public class Rectangle extends Image {
    int a,b;

    public Rectangle(int a, int b) {
        this.a = a;
        this.b = b;
    }

    public double area(){
        double result = 0.0;
        result = a*b;
        System.out.println("面积是"+result);
        return result;
    }

    @Override
    public double perimeter(){
        double result = 0.0;
        result = (a+b)*2;
        System.out.println("周长是"+result);
        return result;
    }
}
